{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {},
   "outputs": [],
   "source": [
    "import numpy as np\n",
    "import os\n",
    "software_struct_traj_feats = np.fromfile(os.path.join(\"1668679528949_traj_feats.bin\"), \n",
    "                                         dtype=np.float32)\n",
    "b = np.fromfile(os.path.join(\"1668679528949_traj_feats_vector.bin\"), \n",
    "                                         dtype=np.float32)\n",
    "c = np.fromfile(os.path.join(\"1668679528949_traj_feats2.bin\"), \n",
    "                                         dtype=np.float32)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "metadata": {},
   "outputs": [],
   "source": [
    "b = b.reshape(-1,9,32,15)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 6,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([[-0.36113855,  0.05027677,  0.06693535, -0.14927115,  0.12936623,\n",
       "        -0.37124068,  0.        , -0.35860622,  0.537809  , -0.61811787,\n",
       "         0.9531321 , -1.2787073 , -1.7027563 , -2.092944  ,  0.        ,\n",
       "        -2.4929006 ,  0.        ,  0.        ,  0.        ,  0.        ,\n",
       "         0.        ,  0.        ,  0.        ,  0.        ,  0.        ,\n",
       "         0.        ,  0.        ,  0.        ,  0.        ,  0.        ,\n",
       "         0.        ,  0.        ],\n",
       "       [-0.01643689,  0.09854306,  0.6560952 ,  0.64830863, -0.2624956 ,\n",
       "         0.101404  ,  0.        ,  0.64315575, -0.25786102,  0.64800966,\n",
       "        -0.16337961,  0.65032965, -0.06868441,  0.11167684,  0.        ,\n",
       "         0.8065316 ,  0.        ,  0.        ,  0.        ,  0.        ,\n",
       "         0.        ,  0.        ,  0.        ,  0.        ,  0.        ,\n",
       "         0.        ,  0.        ,  0.        ,  0.        ,  0.        ,\n",
       "         0.        ,  0.        ],\n",
       "       [-0.33601418,  0.05018797,  0.06655794, -0.15003265,  0.13068958,\n",
       "        -0.36428642,  0.        , -0.35792777,  0.5389141 , -0.61620146,\n",
       "         0.9599551 , -1.2762264 , -1.7034353 , -2.0718932 ,  0.        ,\n",
       "        -2.5089061 ,  0.        ,  0.        ,  0.        ,  0.        ,\n",
       "         0.        ,  0.        ,  0.        ,  0.        ,  0.        ,\n",
       "         0.        ,  0.        ,  0.        ,  0.        ,  0.        ,\n",
       "         0.        ,  0.        ],\n",
       "       [-0.01576112,  0.09961507,  0.65546584,  0.6469872 , -0.26547813,\n",
       "         0.10140851,  0.        ,  0.642364  , -0.26007062,  0.64469814,\n",
       "        -0.16405556,  0.6483439 , -0.06771494,  0.11150686,  0.        ,\n",
       "         0.81308556,  0.        ,  0.        ,  0.        ,  0.        ,\n",
       "         0.        ,  0.        ,  0.        ,  0.        ,  0.        ,\n",
       "         0.        ,  0.        ,  0.        ,  0.        ,  0.        ,\n",
       "         0.        ,  0.        ],\n",
       "       [-4.2       , -4.2       , -4.2       , -4.2       , -4.2       ,\n",
       "        -4.2       ,  0.        , -4.2       , -4.2       , -4.2       ,\n",
       "        -4.2       , -4.2       , -4.2       , -4.2       ,  0.        ,\n",
       "        -4.2       ,  0.        ,  0.        ,  0.        ,  0.        ,\n",
       "         0.        ,  0.        ,  0.        ,  0.        ,  0.        ,\n",
       "         0.        ,  0.        ,  0.        ,  0.        ,  0.        ,\n",
       "         0.        ,  0.        ],\n",
       "       [ 0.3       ,  0.45000002,  1.35      ,  0.75      ,  0.90000004,\n",
       "         0.15      ,  0.        ,  0.6       ,  1.5       ,  1.0500001 ,\n",
       "         1.8000001 ,  1.6500001 ,  2.1000001 ,  1.95      ,  0.        ,\n",
       "         2.4       ,  0.        ,  0.        ,  0.        ,  0.        ,\n",
       "         0.        ,  0.        ,  0.        ,  0.        ,  0.        ,\n",
       "         0.        ,  0.        ,  0.        ,  0.        ,  0.        ,\n",
       "         0.        ,  0.        ],\n",
       "       [ 0.        ,  5.        ,  5.        ,  5.        ,  5.        ,\n",
       "         5.        ,  0.        ,  5.        ,  5.        ,  5.        ,\n",
       "         0.        ,  5.        ,  5.        ,  5.        ,  0.        ,\n",
       "         5.        ,  0.        ,  0.        ,  0.        ,  0.        ,\n",
       "         0.        ,  0.        ,  0.        ,  0.        ,  0.        ,\n",
       "         0.        ,  0.        ,  0.        ,  0.        ,  0.        ,\n",
       "         0.        ,  0.        ],\n",
       "       [ 5.        ,  0.        ,  0.        ,  0.        ,  0.        ,\n",
       "         0.        ,  0.        ,  0.        ,  0.        ,  0.        ,\n",
       "         5.        ,  0.        ,  0.        ,  0.        ,  0.        ,\n",
       "         0.        ,  0.        ,  0.        ,  0.        ,  0.        ,\n",
       "         0.        ,  0.        ,  0.        ,  0.        ,  0.        ,\n",
       "         0.        ,  0.        ,  0.        ,  0.        ,  0.        ,\n",
       "         0.        ,  0.        ],\n",
       "       [ 0.        ,  0.        ,  0.        ,  0.        ,  0.        ,\n",
       "         0.        ,  0.        ,  0.        ,  0.        ,  0.        ,\n",
       "         0.        ,  0.        ,  0.        ,  0.        ,  0.        ,\n",
       "         0.        ,  0.        ,  0.        ,  0.        ,  0.        ,\n",
       "         0.        ,  0.        ,  0.        ,  0.        ,  0.        ,\n",
       "         0.        ,  0.        ,  0.        ,  0.        ,  0.        ,\n",
       "         0.        ,  0.        ]], dtype=float32)"
      ]
     },
     "execution_count": 6,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "b[0,:,:,0]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 8,
   "metadata": {},
   "outputs": [],
   "source": [
    "software_struct_traj_feats = software_struct_traj_feats.reshape(-1,5,32,3)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 9,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "(8, 5, 32, 3)"
      ]
     },
     "execution_count": 9,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "software_struct_traj_feats.shape"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 13,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([[-3.61138552e-01,  5.02767712e-02,  6.69353455e-02,\n",
       "        -1.49271145e-01,  1.29366234e-01, -3.71240675e-01,\n",
       "         0.00000000e+00, -3.58606219e-01,  5.37809014e-01,\n",
       "        -6.18117869e-01,  9.53132093e-01, -1.27870727e+00,\n",
       "        -1.70275629e+00, -2.09294391e+00,  0.00000000e+00,\n",
       "        -2.49290061e+00, -4.89159192e+29,  6.12227299e-41,\n",
       "        -4.89206340e+29,  6.12227299e-41, -4.89253488e+29,\n",
       "         6.12227299e-41, -4.89311517e+29,  6.12227299e-41,\n",
       "        -4.89358665e+29,  6.12227299e-41, -4.89405813e+29,\n",
       "         6.12227299e-41, -4.89452961e+29,  6.12227299e-41,\n",
       "        -4.89500109e+29,  6.12227299e-41],\n",
       "       [-1.64368879e-02,  9.85430628e-02,  6.56095207e-01,\n",
       "         6.48308635e-01, -2.62495607e-01,  1.01404004e-01,\n",
       "         0.00000000e+00,  6.43155754e-01, -2.57861018e-01,\n",
       "         6.48009658e-01, -1.63379610e-01,  6.50329649e-01,\n",
       "        -6.86844066e-02,  1.11676842e-01,  0.00000000e+00,\n",
       "         8.06531608e-01, -4.89946203e+29,  6.12227299e-41,\n",
       "        -4.89993351e+29,  6.12227299e-41, -4.90040499e+29,\n",
       "         6.12227299e-41, -4.90087647e+29,  6.12227299e-41,\n",
       "        -4.90134795e+29,  6.12227299e-41, -4.90181943e+29,\n",
       "         6.12227299e-41, -4.90549457e+29,  6.12227299e-41,\n",
       "        -4.90596605e+29,  6.12227299e-41],\n",
       "       [-2.35516682e-01,  4.98328209e-02,  6.50482997e-02,\n",
       "        -1.53078660e-01,  1.35982931e-01, -3.36469442e-01,\n",
       "         0.00000000e+00, -3.55213970e-01,  5.43334246e-01,\n",
       "        -6.08535826e-01,  9.87247527e-01, -1.26630330e+00,\n",
       "        -1.70615113e+00, -1.98768950e+00,  0.00000000e+00,\n",
       "        -2.57292747e+00, -4.91031818e+29,  6.12227299e-41,\n",
       "        -4.91078966e+29,  6.12227299e-41, -4.91126114e+29,\n",
       "         6.12227299e-41, -4.91184143e+29,  6.12227299e-41,\n",
       "        -4.91231291e+29,  6.12227299e-41, -4.91278439e+29,\n",
       "         6.12227299e-41, -4.91325587e+29,  6.12227299e-41,\n",
       "        -4.91372735e+29,  6.12227299e-41],\n",
       "       [-1.30580235e-02,  1.03903137e-01,  6.52948141e-01,\n",
       "         6.41701400e-01, -2.77408093e-01,  1.01426505e-01,\n",
       "         0.00000000e+00,  6.39197588e-01, -2.68909097e-01,\n",
       "         6.31452322e-01, -1.66759446e-01,  6.40401304e-01,\n",
       "        -6.38370514e-02,  1.10826932e-01,  0.00000000e+00,\n",
       "         8.39301348e-01, -4.92128314e+29,  6.12227299e-41,\n",
       "        -4.92175462e+29,  6.12227299e-41, -4.92222610e+29,\n",
       "         6.12227299e-41, -4.92269758e+29,  6.12227299e-41,\n",
       "        -4.92316906e+29,  6.12227299e-41, -4.92364054e+29,\n",
       "         6.12227299e-41, -4.92422083e+29,  6.12227299e-41,\n",
       "        -4.92469231e+29,  6.12227299e-41],\n",
       "       [-6.00000024e-01, -6.00000024e-01, -6.00000024e-01,\n",
       "        -6.00000024e-01, -6.00000024e-01, -6.00000024e-01,\n",
       "         0.00000000e+00, -6.00000024e-01, -6.00000024e-01,\n",
       "        -6.00000024e-01, -6.00000024e-01, -6.00000024e-01,\n",
       "        -6.00000024e-01, -6.00000024e-01,  0.00000000e+00,\n",
       "        -6.00000024e-01, -4.92904444e+29,  6.12227299e-41,\n",
       "        -4.92951592e+29,  6.12227299e-41, -4.93009621e+29,\n",
       "         6.12227299e-41, -4.93056769e+29,  6.12227299e-41,\n",
       "        -4.93103917e+29,  6.12227299e-41, -4.93151065e+29,\n",
       "         6.12227299e-41, -4.93198213e+29,  6.12227299e-41,\n",
       "        -4.93245361e+29,  6.12227299e-41]], dtype=float32)"
      ]
     },
     "execution_count": 13,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "software_struct_traj_feats[0,:,:,0]#5x32"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 14,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "-5.2745675e+29"
      ]
     },
     "execution_count": 14,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "software_struct_traj_feats.min()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.6.13"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 4
}
